package com.gws.ievent.controller.v1;

import com.gws.ievent.common.Result;
import com.gws.ievent.db.service.EventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author song
 * @date 2022/10/23 9:40
 */
@RestController
@RequestMapping("/v1/event/")
public class V1EventController extends BaseV1Controller {

    @Autowired
    private EventService eventService;


    @GetMapping(value = "delete")
    public Result<Object> delete(@RequestParam("id") Long id) {
        eventService.cancel(id);
        return Result.success(0, "删除成功");
    }

}
